/**
 * Created by lyt on 2020.7.
 * url  xxx/index.html?log=
 */
require(["cat", "vue", "common", "api", "dialog"], function (
  cat,
  Vue,
  app,
  api,
  dialog
) {
  let that; //回去标识  不一定是从那来回哪去;
  const HEIGTH =
    window.innerHeight > 0
      ? window.innerHeight
      : document.documentElement.clientHeight;

  //   app.storeValue("callbackSing", callbackSing, "session"); //去授权前将回去标识存在缓存

  var ecode = app.getValue("code") || "";

  if (ecode == "") {
    dialog.tipDialog("未获取到参数,请重新进入");
    return false;
  } else {
    app.storeValue("wxcode", ecode, "session");
    let originURL = app.getValue("url", "session");
    if(originURL){
        window.location.href = originURL;
    }else{
        window.location.href = window.th.homeIndex;
    }
   
  }
});
